import FlowModelInstance from '@/components/flow/typs/FlowModelInstance.js';

export default class NewEmptyBranchForGatewayCommand {
  supportInstance;
  nodeId;

  constructor(supportInstance, nodeId) {
    this.supportInstance = supportInstance;
    this.nodeId = nodeId;
  }

  serve() {
    let flowModelInstance = new FlowModelInstance(this.supportInstance.getModel());
    flowModelInstance.addNewBranchForGateway(this.nodeId);
    this.supportInstance.setModel(flowModelInstance.getModelString());
  }
};